package com.zhoutao123.article.dubbo.provider.spring;

import com.zhoutao123.article.dubbo.provider.Color;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

public class CustomerBeanDefinitionRegister implements ImportBeanDefinitionRegistrar {

  @Override
  public void registerBeanDefinitions(AnnotationMetadata meta, BeanDefinitionRegistry registry) {
    BeanDefinition definition = new RootBeanDefinition(Color.class);
    registry.registerBeanDefinition("BeanName", definition);
  }
}
